<%@page import="java.io.Writer"%>
<%@page import="java.io.PrintWriter"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Connection"%>
<%@page import="com.scrum.Connection.*"%>
<%@page import="com.scrum.globals.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Top Rests</title>
<!-- Le styles -->
<link href="../assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css">
<link href="../assets/css/global.css" rel="stylesheet" type="text/css">
<link href="../assets/css/index.css" rel="stylesheet" type="text/css">
<link href="../assets/font/font-awesome/css/font-awesome.min.css"
	rel="stylesheet">
<!--     <link href="assets/css/essential/slider2.css" rel="stylesheet">
    <link href="assets/css/essential/social-icons.css" rel="stylesheet"> -->

<!-- Fav and touch icons -->
<link rel="shortcut icon" href="../assets/img/favicon.png">
<!--     <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-57-precomposed.png"> -->
<!--    <style type="text/css" id="holderjs-style">.holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}</style> -->
</head>
<%
	int id_sel = 3;
	String id = request.getParameter("tp");
	if (id != null) {
		id_sel = Integer.parseInt(id);
		Global.id_select = id_sel;
	}
%>
<body>
	<jsp:include page="navbar.jsp"></jsp:include>
	<!-- </div> /.container -->
	<div class="navbar navbar-default navbar-static-top">
		<div class="navbar-inner">
			<div class="container">
				<div class="nav-collapse collapse">
					<ul class="nav">
						<li class="current"><a href="viewRest.jsp">Rests</a></li>
						<li><a href="viewFood.jsp">Foods</a></li>
						<li><a href="viewEntertainment.jsp">Entertainments</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	</div>
	<!-- /.navbar-wrapper -->
	<!-- Container -->
	<div class="container" style="padding-top: 100px;">
		<img src="../assets/img/img-title-rests.png">
		<div class="container-fluid">
			<div class="row-fluid">
				<%
					String sql = "SELECT * FROM toprest WHERE catalogid='"
							+ Global.id_select + "'";
					ResultSet rs = DBConnection.getData(sql);
					int i = 0;
					while (rs.next()) {
						i++;
				%>

				<div class="span4" style="width: 30%; float: left;">
					<div class="picture">
						<a href="#" title=""><img src="../<%=rs.getString(3)%>" alt="">
							<div style="opacity: 0; display: block;"
								class="image-overlay-link"></div></a>

						<div class="item-description alt">
							<h5>
								<a href="#"><%=rs.getString(2)%></a>
							</h5>
							<div class='rating-icons'>
								<i class="fa fa-star icon-orange"></i> <i
									class="fa fa-star icon-orange"></i> <i
									class="fa fa-star icon-orange"></i> <i
									class="fa fa-star icon-orange"></i> <i
									class="fa fa-star icon-orange"></i>
							</div>
							<p>
								<%=rs.getString(4)%>
							</p>
						</div>
					</div>
				</div>
				<%
					if (i % 3 == 0) {
							out.println("<div style='clear: both;'></div>");
						}
					}
					DBConnection.closeConnection();
				%>

			</div>
		</div>
	</div>

	<jsp:include page="footer.jsp"></jsp:include>